#ifndef SCOOPING_NODE_HPP
#define SCOOPING_NODE_HPP

#include <Eigen/Core>
#include <QList>

#include "cluster.hpp"

class Cluster;

using namespace Eigen;

class ClusterNode {
  public:
    ClusterNode();
    ~ClusterNode();
    ClusterNode(Cluster *cluster);
    ClusterNode(const Vector3d &position,Cluster *cluster);
    void setCluster(Cluster *cluster);
    void setPosition(const Vector3d &position);
    const Vector3d & getPosition() const;
    void calculatePosition(const Cluster *otherCluster);
    void addChild(ClusterNode *child);
    void setParent(ClusterNode *parent);
    const QList<ClusterNode *> & getChildren() const;
  private:
    Vector3d position;
    QList<ClusterNode *> children;
    ClusterNode *parent;
    Cluster *cluster;
};

#endif
